<?php
require_once '../frm/init.php';


$menu = array(

    "Usuarios" => array(

        "url"   => "usuarios.php",
        "sub"   => array(

            "usuarios.php"      => array("titulo" => "Listado")

        )

    ),
    "Registrados" => array(

        "url"   => "registrados.php",
        "sub"   => array(

            "registrados.php"   => array("titulo" => "Listado")

        )

    ),
    "Codigos" => array(

        "url"   => "codigos.php",
        "sub"   => array(
            "codigos.php"   => array("titulo" => "Listado")
        )

    ),
    "Invitaciones" => array(

        "url"   => "invitaciones.php",
        "sub"   => array(
            "invitaciones.php"   => array("titulo" => "Listado")
        )

    ),
    "Ganadores" => array(

        "url"   => "ganadores.php",
        "sub"   => array(
            "ganadores.php"   => array("titulo" => "Listado")
        )

    )

);

$nombrePagina   = Ftl_Path::getFileName();
$titulo         = "";

?>


<!-- Start: page-top-outer -->
<div id="page-top-outer">

<!-- Start: page-top -->
<div id="page-top">

	<!-- start logo -->
	<div id="logo">
	<a href=""><img src="images/shared/logo.png" width="156" height="40" alt="" /></a>
	</div>
	<!-- end logo -->

	<!--  start top-search -->
	<div id="top-search">
	</div>
 	<!--  end top-search -->
 	<div class="clear"></div>

</div>
<!-- End: page-top -->

</div>
<!-- End: page-top-outer -->

<div class="clear">&nbsp;</div>

<!--  start nav-outer-repeat................................................................................................. START -->
<div class="nav-outer-repeat">
<!--  start nav-outer -->
<div class="nav-outer">

		<!-- start nav-right -->
		<div id="nav-right">

			<div class="nav-divider">&nbsp;</div>
			<div class="showhide-account"><img src="images/shared/nav/nav_myaccount2.gif" width="93" height="14" alt="" /></div>
			<div class="nav-divider">&nbsp;</div>
			<a href="logout.php" id="logout"><img src="images/shared/nav/nav_logout2.gif" width="64" height="14" alt="" /></a>
			<div class="clear">&nbsp;</div>

			<!--  start account-content -->
			<div class="account-content">
			<div class="account-drop-inner">
				<!--a href="" id="acc-settings">Configuración</a>
				<div class="clear">&nbsp;</div>
				<div class="acc-line">&nbsp;</div-->
				<a href="usuarios-am.php?id=<?php echo $oSession->getUser()->getId();?>" id="acc-details">Mis datos</a>
				<div class="clear">&nbsp;</div>
				<div class="acc-line">&nbsp;</div>
				<a href="usuarios-cp.php?id=<?php echo $oSession->getUser()->getId();?>" id="acc-details">Cambiar clave</a>

			</div>
			</div>
			<!--  end account-content -->

		</div>
		<!-- end nav-right -->

                <div class="nav">
		<div class="table">

<?php

                foreach ($menu as $item => $datos)
                {
                    $menuActivo = false;
                    if (array_key_exists($nombrePagina, $datos["sub"]))
                            $menuActivo = true;

                    echo "<ul " .  ($menuActivo ? "class=\"current\"" : "class=\"select\"") . "><li><a href=\"{$datos["url"]}\"><b>{$item}</b><!--[if IE 7]><!--></a><!--<![endif]-->\n";
                    echo "<!--[if lte IE 6]><table><tr><td><![endif]-->\n";
                    echo "<div class=\"select_sub". ($menuActivo ? " show" : "") . "\">\n";
                    echo "<ul class=\"sub\">\n";

                    foreach ($datos["sub"] as $url => $datosSub)
                    {
                        $subMenuActivo = ($nombrePagina == $url) ? true : false;

                        if ($subMenuActivo) $titulo = $datosSub["titulo"];

                        echo "<li " . ($subMenuActivo ? "class=\"sub_show\"" : "")  . "><a href=\"{$url}\">{$datosSub["titulo"]}</a></li>\n";
                    }
                    echo "</ul>\n";
                    echo "</div>\n";
                    echo "<!--[if lte IE 6]></td></tr></table></a><![endif]-->\n";
                    echo "</li>\n";
                    echo "</ul>\n";
                    echo "<div class=\"nav-divider\">&nbsp;</div>\n";


                }
?>
		<div class="clear"></div>
		</div>
		<div class="clear"></div>
		</div>

</div>
<div class="clear"></div>

</div>

 <div class="clear"></div>




